<style>
    .modal-content{
        width: 400px;
        border-radius: 10px;
        margin-top:calc(50% - 100px)
    }
   .btn-fun{margin-bottom: 20px;}
</style>
<section class="content">
    <div class="search">
        <form role="form">
            <div class="row">
                <div class="col-xs-3 col-md-4">
                    <div class="form-group">
                        <div class="date-box">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" ng-model="evaluateModel.startTimeRange" ng-change="renderLine()"
                                       class="form-control pull-right date-picker timerange" placeholder="开始时间" >
                                <span class="line">-</span>
                                <input type="text" ng-model="evaluateModel.endTimeRange" ng-change="renderLine()"
                                       class="form-control pull-right date-picker timerange" placeholder="结束时间"  >
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-1">
                    <div class="form-group" >
                        <input type="text" class="form-control" placeholder="订单号" ng-model="evaluateModel.orderNo">
                    </div>
                </div>
                <div class="col-xs-1">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="用户姓名" ng-model="evaluateModel.userName">
                    </div>
                </div>
                <div class="col-xs-1">
                    <input type="button" class="btn-primary btn" ng-click="getCommentList(1)" value="查询">
                </div>
                <div class="col-xs-1">
                    <input type="button" class="btn-default btn" value="导出" ng-click="exportExcel()">
                </div>
                <div class="col-xs-1">
                    <input type="button" class="btn-default btn" value="编辑标签" data-toggle="modal" data-target="#tagsModal" >
                </div>

            </div>
        </form>
    </div>
    <div class="table-box">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th>订单号</th>
                <th>下单时间</th>
                <th>用户姓名</th>
                <th>预约专家</th>
                <th>预约名称</th>
                <th>评分</th>
                <th>选择评价</th>
                <th>自定评价</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat=" n in evaluateList">
                <td>{{n.orderNo}}</td>
                <td>{{n.orderTime}}</td>
                <td>{{n.userName}}</td>
                <td>{{n.doctorName}}</td>
                <td>{{n.orderName}}</td>
                <td>{{n.rating}}</td>
                <td>{{n.tags}}</td>
                <td>{{n.content}}</td>
                <td>
                    <a href="javascript:;" ng-click="conversation($event)" data-userName="{{n.userName}}" data-userCellPhone="{{n.userCellPhone}}">通话</a> |
                    <a href="javascript:;" ng-if="n.rating<=3" data-toggle="modal" data-target="#myModal" data-detail="{{n}}" ng-click="verify($event)">评价审核</a>
                    <span ng-if="n.rating>3">评价审核</span>
                </td>
            </tr>
            <tr ng-if="evaluateList.length<=0">
               <td colspan="9" class="text-center">暂无数据！</td>
            </tr>
            </tbody>
        </table>
        <div class="page-function" ng-if="evaluateList.length > 0"></div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        评价审核
                    </h4>
                </div>
                <div class="modal-body">
                    <div class="form-group col-xs-6" ng-repeat="n in tags" >
                        <a href="javascript:;" class="btn btn-info disabled btn-sm" role="button">{{n}}</a>
                        <input type="radio" name=""  value="option1" checked>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消
                    </button>
                    <button type="button" class="btn btn-primary" ng-click="commit()">确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!--//标签编辑-->
    <div class="modal fade" id="tagsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="tagsModalLabel">
                        编辑标签
                    </h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <p class="col-xs-12">4分，5分</p>
                        <div class="form-group col-xs-6" ng-repeat="n in tagsList" ng-if="n.ratings=='4,5' || n.ratings=='5,4'">
                            <input type="text" name="tags" value="{{n.name}}" class="btn btn-default btn-sm" data-detail="{{n}}" >
                        </div>
                    </div>

                    <div class="row">
                        <hr>
                        <p class="col-xs-12">1分，2分 ,3分</p>
                        <div class="form-group col-xs-6" ng-repeat="n in tagsList" ng-if="n.ratings=='1,2,3' || n.ratings=='3,2,1'" >
                            <input type="text" name="tags" value="{{n.name}}" class="btn btn-default" data-detail="{{n}}" >
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-6 text-center"></div>
                        <div class="col-xs-6 text-center"></div>
                    </div>
                </div>
                <div class="modal-footer">
                        <div class="col-xs-12 btn-fun">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-primary" ng-click="edtTags()">确定</button>
                        </div>
                        <table class="table table-bordered text-center">
                            <tr>
                                <td>5分</td>
                                <td>非常满意，无可挑剔</td>
                            </tr>
                            <tr>
                                <td>4分</td>
                                <td>比较满意，仍可改善</td>
                            </tr>
                            <tr>
                                <td>3分</td>
                                <td>一般，需要改善</td>
                            </tr>
                            <tr>
                                <td>2分</td>
                                <td>不满意，比较差</td>
                            </tr>
                            <tr>
                                <td>1分</td>
                                <td>非常不满意，很差</td>
                            </tr>

                        </table>


                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</section>
